/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package remote;

import java.util.ArrayList;
import java.util.List;


/**
 *
 * @author Nuno
 */
public class Folder {
    private String name;
    private List<Folder> fold;
    private List<rFile> file;

    public Folder(String nome){
        this.name=nome;
        fold = new ArrayList();
        file = new ArrayList();

    }

    public void addFolder(Folder f){
        fold.add(f);
    }

    public void addFile(rFile fi){
        file.add(fi);
    }

   public void print(int nivel){
       System.out.println();
       for(int i=0;i<nivel;i++){
            System.out.print("-");
        }
        System.out.print(name);

        for(int i=0; i< fold.size(); i++){
            fold.get(i).print(nivel+1);
        }

        for(int j=0; j< file.size(); j++){
            file.get(j).print(nivel+1);
        }

   }
}
